<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>test shuzu</title>
	</head>
	<body>
		<button onclick="test1()">ttt</button>
	</body>
	<script type="text/javascript">
		
		var showModal = 'a';
		
		
		var deviceMenu = [
		{text: 'aaa', action: showModal},
		//{text: '移至默认组', action: showModal},
		{text: 'bbb', action: showModal},
		{text: 'ccc', action: showModal},
		{divider: true},
		{text: 'ddd', subMenu: [
							{text: 'qqq', action: showModal},
							{text: 'www', action: showModal},
							{text: 'eee', action: showModal},
							{text: 'rrrr', action: showModal},
							{text: 'tttt', action: showModal},
							{text: 'yyyy', action: showModal},
							{text: 'uuuu', action: showModal},
							{text: 'iiii', action: showModal},
							{text: 'oooo', action: showModal}
					   ]},
		{text: '维护', subMenu: [
							{text: 'zzzz', action: showModal},
							{text: 'xxxx', action: showModal},
							{text: 'cccc', action: showModal},
							{text: 'vvvv', action: showModal}
					   ]}
	];
	
	
	
		function test1() {
			console.log(deviceMenu);
			console.log("above is first:");
			var pz = deviceMenu[4];
			console.log(pz);
			var subMe = pz.subMenu;
			console.log(subMe);
			pz.subMenu = [
				{text: 'qqq', action: showModal},
				{text: 'www', action: showModal},
				{text: 'eee', action: showModal},
				{text: 'rrrr', action: showModal},
				{text: 'tttt', action: showModal},
				{text: 'yyyy', action: showModal},
				{text: 'uuuu', action: showModal},
				{text: 'oooo', action: showModal}
			];
			var wh = deviceMenu[5];
			wh.subMenu = [
				{text: 'zzzz', action: showModal},
				{text: 'xxxx', action: showModal}
			];
			console.log("next is finally:");
			console.log(deviceMenu);
		}
	</script>
</html>
